package com.xiaoming.mojbackenserviceclient.client;

import com.xiaoming.mojbackendmodel.model.entity.Question;
import com.xiaoming.mojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Set;

@FeignClient(value = "question-service",path = "/api/question/inner")
public interface QuestionClient {


    @GetMapping("/get/questionId")
    public Question getQuestionById(@RequestParam("questionId") Long questionId);

    @PostMapping("/update/id")
    public boolean updateById(@RequestBody QuestionSubmit questionSubmit);

    @GetMapping("/get/questionSubmitId")
    public QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") Long questionSubmitId);

    @PostMapping("/update/question/id")
    public boolean updateQuestionById(@RequestBody Question question);
}